Skip to content

Align all - #92

Closed
Tweentyy wants to merge 25 commits into
developfrom
main
Closed

Align all#92
Tweentyy wants to merge 25 commits into
developfrom
main

Conversation

@Tweentyy

@Tweentyy Tweentyy commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 16:02
@sonarqubecloud

sonarqubecloud Bot commented Apr 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns TypeScript configuration, manager typing, and various utilities, while also updating dependencies and GitHub Actions workflows.

Changes:

  • Update TS build configuration and path alias mappings; introduce rootDir.
  • Refactor BaseManager and all managers to use a typed generic structure.
  • Adjust utilities (file loading via pathToFileURL, translation typing, timestamp formatters) and bump discord.js plus CI workflow versions.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tsconfig.json Updates TS target and rewrites path aliases / adds rootDir.
src/utils/translation.ts Tightens args typing and makes translateToLocale generic.
src/utils/files.ts Improves dynamic import URL construction and file path traversal.
src/utils/dateFormatters.ts Reworks/expands timestamp formatting helpers.
src/typescript/types.ts Adjusts sonar suppression comment.
src/managers/BaseManager.ts Makes BaseManager generic and simplifies abstract API.
src/managers/AutoCompleteManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/ButtonManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/CommandManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/ContextMenuManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/ModalManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/SelectMenuManager.ts Adapts to new BaseManager<T> signature and simplified getters.
src/managers/EventManager.ts Adapts to new BaseManager<T> signature and improves event execution argument forwarding.
src/client/StelliaUtils.ts Updates call sites to new manager method signatures and reduces unused type imports.
package.json Bumps framework dev version and discord.js range.
pnpm-lock.yaml Locks discord.js to 14.26.2.
.github/workflows/update-dependencies.yml Updates action versions and Node version used for dependency updates.
.github/workflows/tag.yml Adds workflow to tag dev versions based on package version + commit SHA.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +9
export const formatTimestampToMediumTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.MediumTime);
};

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TimestampStyles.MediumTime is not one of Discord’s supported timestamp styles (and historically isn’t present in discord.js’s TimestampStyles enum). This will fail type-checking/building; consider using TimestampStyles.ShortTime/LongTime or switching to a custom formatter if you need additional formats.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +33
export const formatTimestampToLongDateShortTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.LongDateShortTime);
};

export const formatTimestampToLongDate = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.LongDate);
export const formatTimestampToFullDateShortTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.FullDateShortTime);
};

export const formatTimestampToShortDateShortTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.ShortDateShortTime);
};

export const formatTimestampToShortDateMediumTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.ShortDateMediumTime);
};

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TimestampStyles.LongDateShortTime / FullDateShortTime / ShortDateShortTime / ShortDateMediumTime are not valid Discord timestamp styles (Discord only supports t, T, d, D, f, F, R). These enum members are unlikely to exist in discord.js and will break compilation; consider removing these helpers or mapping them to supported styles.

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 6
import { time, TimestampStyles } from "discord.js";

export const formatTimestampToShortDateTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.ShortDateTime);
};

export const formatTimestampToShortTime = (timestamp: number): string => {
return time(Math.round(timestamp / 1000), TimestampStyles.ShortTime);
};

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes previously exported helpers like formatTimestampToShortDateTime, formatTimestampToLongDateTime, and formatTimestampToLongTime. Since src/utils/index.ts re-exports this module, this is a breaking API change for framework consumers; consider keeping the old exports as aliases (or doing a major version bump / documenting the deprecation).

Copilot uses AI. Check for mistakes.
@Tweentyy Tweentyy closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants